const mobx = require('mobx');
const { observable } = require('mobx');

const arr = mobx.observable(['a', 'b', 'c']);

console.log(arr, Array.isArray(arr), mobx.isObservableArray(arr));

console.log(arr[0], arr[2]);

const obj = mobx.observable({ a: 1, b: 2 });

console.log(obj);
console.log(obj.a, obj.b);

const num = mobx.observable.box(1);

class Store {
  @observable array = [];
  @observable obj = {};
  @observable map = new Map();

  @observable string = 'hello';
  @observable number = 20;
  @observable bool = false;
}

const data = new Store();

console.log(data.number);
data.number = 5;
console.log(data.number);
